package com.yummy.service.impl;

import com.yummy.dto.PermissionVo;
import com.yummy.mapper.PermissionMapper;
import com.yummy.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    PermissionMapper permissionMapper;
    @Override
    public List<PermissionVo> queryAllMenu(){
        return permissionMapper.selectAllMenu();
    }

    @Override
    public List<Long> queryPermissionIdByRoleId(int id) {
        return permissionMapper.selctPermissionIdByRoleId(id);
    }

    @Override
    public int queryRoleIdById(int mid) {
        return permissionMapper.selectRoleIdById(mid);
    }

    @Override
    public List<PermissionVo> queryMenuByManager(int mid) {
        return permissionMapper.selectMenuByManager(mid);
    }
}
